import datetime
from orionbase.common.orion_errors import create_validation_trigger_rule_errors
_curr_yearmonth = datetime.datetime.now().strftime('%Y-%m')
#_curr_yearmonth = _curr_yearmonth + '-01'

_yearmonth = instance.month
if isinstance(instance.month, datetime.date):
    _yearmonth = instance.month.strftime('%Y-%m')
if _yearmonth < _curr_yearmonth:
    raise create_validation_trigger_rule_errors(u'只能选择未来月份，包含当月')
